import server from '@/plugin/axios/request_axios.js'

/* eslint-disable */
/**
 * 获取所有资产数据
 * @param {Number} data
 * @returns
 */
export function getAssetsGroupData(data) {
  return server('get', '/assetsGroup/getAssetsTypeGroupTagList', data)
}

/**
 * 新增资产
 * @param {Number} from
 * @returns
 */
export function AddAssets(From) {
  return server('post', '/assetsBeau/addAssetsBeau', From)
}

/**
 * 根据id删除单个数据
 * @param {Number} id
 * @returns
 */
export function delAssetsItem(id) {
  // return server('delete', '/assetsBeau/deleteAssetsBeau', { params: { id: id }})
  return server('delete', '/assetsBeau/deleteAssetsBeau', { id: id })
}

/**
 * 批量删除数据
 * @param {Number} ids
 * @returns
 */
export function delAssetsItems(ids) {
  // return server('delete', '/assetsBeau/deleteAssetsBeaus', { params: { ids: ids.join(',') } })
  return server('delete', '/assetsBeau/deleteAssetsBeaus', { ids: ids.join(',') } )
}

/**
 * 根据id查询信息,修改表单
 * @param {Number} id
 * @returns
 */
export function searchDataById(id) {
  return server('get', '/assetsBeau/getAssetsTypeTagInterfaceById', { id: id })
}

/**
 * 修改信息提交表单
 * @param {Number}
 * @returns
 */
export function addEditData(From) {
  return server('put', '/assetsBeau/updateAssetsBeau', From)
}

/**
 * 获取资产组数据
 * @param {Number} data
 * @returns
 */
export function getAssetsGroupListData() {
  return server('get', '/assetsGroup/getAssetsGroupList')
}

/**
 * 获取资产组数据
 * @param {Number} data
 * @returns
 */
export function deleteAssetsGroup(id) {
  // return server('delete', '/assetsGroup/deleteAssetsGroup', { params: { id: id }})
  return server('delete', '/assetsGroup/deleteAssetsGroup', { id: id })
}

/**
 * 根据id查询资产组资产
 * @param {Number} id
 * @returns
 */
export function searchGroupById(data) {
  return server('get', '/assetsGroup/getAssetsBeauGroupIdList', data)
}

/**
 * 新增资产组资产
 * @param {Number} id
 * @returns
 */
export function submitGroup(From) {
  return server('post', '/assetsGroup/addAssetsGroup', From)
}

/**
 * 修改资产组资产
 * @param {Number} id
 * @returns
 */
export function putGroup(From) {
  return server('put', '/assetsGroup/updateAssetsGroup', From)
}

/**
 * 移动资产
 * @param {Number} id
 * @returns
 */
export function moveAssets(data) {
  return server('put', '/assetsBeau/updateMigrationAssets', data)
}

/**
 * 查询标签组数据
 * @param {Number}
 * @returns
 */
export function inquireTag() {
  return server('get', '/assetsTagGroup/getAssetsTagGroupList')
}

/**
 * 设置标签
 * @param {Number}
 * @returns
 */
export function settingTags(data) {
  return server('put', '/assetsBeau/updateAssetsTags', data)
}

/**
 * 获取地理位置
 * @param {Number}
 * @returns
 */
export function position() {
  return server('get', '/assetsBeau/getPosition')
}
